package ru.integrationmessagers.vk.model.dto.mapper.self;

import org.springframework.stereotype.Component;
import ru.integrationmessagers.vk.model.domain.Friend;
import ru.integrationmessagers.vk.model.dto.self.FriendDto;

@Component
public class FriendMapper extends AbstractMapper<FriendDto, Friend> {

    @Override
    public FriendDto toDto(Friend model) {
        FriendDto dto = new FriendDto();

        setBaseDtoFields(dto, model);

        dto.setFirstName(model.getFirstName());
        dto.setLastName(model.getLastName());
        dto.setClosed(model.isClosed());
        dto.setTrackCode(model.getTrackCode());
        dto.setPhoto200Orig(model.getPhoto200Orig());
        dto.setCanAccessClosed(model.isCanAccessClosed());

        return dto;
    }
}
